package com.dylan.magic.common.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.TimeUnit;

/**
 * @author : ankang
 * @date : 2020/3/1 15:25
 * @Description :
 */
public class SleepUtil {
    private static Logger logger = LoggerFactory.getLogger(SleepUtil.class);

    public static void sleep(long time, TimeUnit timeUnit) {
        try {
            timeUnit.sleep(time);
        } catch (InterruptedException e) {
            logger.error("sleep error", e);
        }
    }
}
